package com.zczc.entity;

import com.sun.org.apache.xpath.internal.operations.Bool;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @ClassName: MessageUser
* @Description: message_user表对应的java bean类
* @author: yishui zhiyubujian@163.com
 */
@Table(name = "message_user")
public class MessageUser implements Serializable {
    /**
     * @Fields message_user.id :
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY, generator = "select uuid()")
    private String id;

    /**
     * 消息的id
     */
    /**
     * @Fields message_user.message_id :消息的id
     */
    @Column(name = "message_id")
    private String messageId;

    /**
     * 用户的id
     */
    /**
     * @Fields message_user.user_id :用户的id
     */
    @Column(name = "user_id")
    private String userId;

    /**
     * 逻辑删除
     */
    /**
     * @Fields message_user.deleted :逻辑删除
     */
    private Boolean deleted;

    /**
     * 是否添加成功添加到用户表
     */
    /**
     * @Fileds message_user.added : 是否添成功加到用户表
     */
    @Column(name = "added")
    private Boolean added;

    private static final long serialVersionUID = 1L;

    /**
     * @return id
     */
    /**
     * @return message_user.id : 返回 
     */
    public String getId() {
        return id;
    }

    /**
     * @param id
     */
    /**
     * @param id of message_user : 设置 
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * 获取消息的id
     *
     * @return message_id - 消息的id
     */
    /**
     * @return message_user.message_id : 返回 消息的id
     */
    public String getMessageId() {
        return messageId;
    }

    /**
     * 设置消息的id
     *
     * @param messageId 消息的id
     */
    /**
     * @param messageId of message_user : 设置 消息的id
     */
    public void setMessageId(String messageId) {
        this.messageId = messageId;
    }

    /**
     * 获取用户的id
     *
     * @return user_id - 用户的id
     */
    /**
     * @return message_user.user_id : 返回 用户的id
     */
    public String getUserId() {
        return userId;
    }

    /**
     * 设置用户的id
     *
     * @param userId 用户的id
     */
    /**
     * @param userId of message_user : 设置 用户的id
     */
    public void setUserId(String userId) {
        this.userId = userId;
    }

    /**
     * 获取逻辑删除
     *
     * @return deleted - 逻辑删除
     */
    /**
     * @return message_user.deleted : 返回 逻辑删除
     */
    public Boolean getDeleted() {
        return deleted;
    }

    /**
     * 设置逻辑删除
     *
     * @param deleted 逻辑删除
     */
    /**
     * @param deleted of message_user : 设置 逻辑删除
     */
    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }

    public Boolean getAdded() {
        return added;
    }

    public void setAdded(Boolean added) {
        this.added = added;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", messageId=").append(messageId);
        sb.append(", userId=").append(userId);
        sb.append(", deleted=").append(deleted);
        sb.append(", added=").append(added);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        MessageUser other = (MessageUser) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getMessageId() == null ? other.getMessageId() == null : this.getMessageId().equals(other.getMessageId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted()))
            && (this.getAdded() == null ? other.getAdded() == null : this.getAdded().equals(other.getAdded()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getMessageId() == null) ? 0 : getMessageId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
        result = prime * result + ((getAdded() == null) ? 0 : getAdded().hashCode());
        return result;
    }
}